#include"Process_Pool.hpp"
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        std::cout << "Usage: " << argv[0] << " num_processes" << std::endl; // 可执行程序后面接数字，表示进程数
        return -1;
    }
    int num_processes = std::stoi(argv[1]); // 获取进程数
    //1、初始化进程池
    ProcessPool pool(num_processes,Work);
    pool.InitPool();
    //2、分配任务
    pool.DispatchTasks();
    //3、清理进程池
    pool.CleanPool();
    return 0;
}